<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/24/024
 * Time: 20:12
 */

namespace app\admin\validate;

class MemberValidate extends \think\Validate
{

    const SCENE_ADD = 'create'; //添加用户


    protected $rule = [
        'account' => 'require|max:32',
        'password' =>  'max:32',
    ];


    protected $message  = [
        'account.require' => '请填写账号',
        'account.max' => '账号不能超过32位',
        'password.max' => '密码不能超过32位',
    ];

    protected $scene  = [
       self::SCENE_ADD => ['account', 'password'],
    ];

}